﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Evolution.Structure.Globe.Units;
using EvolutionBaseType;

namespace EvolutionLogic.Handler
{
    class UnitHandle
    {

        public Unit UnitData { get; private set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="player"></param>
        public UnitHandle(Unit unitData)
        {
            this.UnitData = unitData;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="newPosition"></param>
        /// <param name="wItem"></param>
        public void MoveUnit(Point newPosition, WorldItem wItem)
        {
            UnitData.Position = newPosition;
            UnitData.ParentWorldItem = wItem;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>new Health of Unit</returns>
        public double DefendUnit(Unit attackingUnit)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>new Health</returns>
        public double AttackEnemyUnit(Unit defendingUnit)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Alert unit if enemy comes to unit
        /// </summary>
        public void AlertUnit()
        {
            throw new NotImplementedException();
            /*
             * Check if enemy is near and change mode if necessary
             */
        }

        /// <summary>
        /// 
        /// </summary>
        public void SetUnitsToSleep()
        {
            UnitData.UnitMode = UnitModes.Sleeping;
        }
    }
}
